﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace BusinessObjects
{
    [DataContract]
    public class ChatMessage : BaseBusinessObject
    {
        private int senderId;
        private int senderMapId;
        private string senderName;
        private string text;

        [DataMember]
        public int SenderId
        {
            get
            {
                return this.senderId;
            }
            set
            {
                if ( this.senderId == value )
                    return;

                this.senderId = value;
                this.NotifyPropertyChanged( "SenderId" );
            }
        }

        [DataMember]
        public int SenderMapId
        {
            get
            {
                return this.senderMapId;
            }
            set
            {
                if ( this.senderMapId == value )
                    return;

                this.senderMapId = value;
                this.NotifyPropertyChanged( "SenderMapId" );
            }
        }

        [DataMember]
        public string Text
        {
            get
            {
                return this.text;
            }
            set
            {
                if ( this.text == value )
                    return; 

                this.text = value;
                this.NotifyPropertyChanged( "Text" );
            }
        }

        [DataMember]
        public string SenderName
        {
            get
            {
                return this.senderName;
            }
            set
            {
                if ( this.senderName == value )
                    return;

                this.senderName = value;
                this.NotifyPropertyChanged( "SenderName" );
            }
        }
    }
}
